Skip to main content

Inverse Functions and the Logarithm

Inverse Function

If ff is a function, then the function gg is the inverse function of ff if

g(f(x))=xg(f(x))=x

for all xx in which f(x)f(x) can be calculated.

Details

The inverse of a function ff is denoted by f1f^{-1}, i.e.

f1(f(x))=xf^{-1}(f(x))=x

Examples

Example

If f(x)=x2f(x) = x^2 for x<0x<0 then the function gg, defined as g(y)=yg(y)=\sqrt{y} for y>0y>0, is not the inverse of ff since g(f(x))=x2=x=xg(f(x))=\sqrt{x^2} = |x| = -x for x<0x<0.

When the Inverse Exists: The Domain Question

Inverses do not always exist. For an inverse of ff to exist, ff must be one-to-one, i.e. for each xx, f(x)f(x) must be unique.

Fig. 13

Figure: The function f(x)=x2f(x)=x^2 does not have an inverse since f(x)=1f(x)=1

has two possible solutions 1-1 and 11.

Examples

Example

f(x)=x2f(x)=x^2 does not have an inverse since f(x)=1f(x)=1 has two possible solutions -1 and 1.

Note

Note that iff ff is a function, then the function gg is the inverse function of ff, if g(f(x))=xg(f(x)) = x for all calculated values of xx in f(x)f(x).

The inverse function of ff is denoted by f1f^{-1}, i.e. f1(f(x))=xf^{-1}(f(x)) = x.

Example

What is the inverse function, f1f^{-1}, of ff if f(x)=5+4xf(x) = 5 + 4x. The simplest approach is to write y=f(x)y=f(x) and solve for xx.

With

f(x)=5+4xf(x) = 5 + 4x

we write

y=5+4xy = 5 + 4x

which we can now rewrite as

y5=4xy - 5 = 4x

and this implies

y54=x\displaystyle\frac{y-5}{4} = x

And there we have it, very simple:

f1(f(x))=y54f^{-1}(f(x)) = \displaystyle\frac{y - 5}{4}

The Base 10 Logarithm

When xx is a positive real number in x=10yx=10^y, yy is referred to as the base 10 logarithm of x and is written as:

y=log10(x)y=\log_{10}(x)

or

y=log(x)y=\log(x)

Details

If log(x)=a\log (x) = a and log(y)=b\log (y)=b, then x=10ax = 10^a and y=10by = 10^b, and

xy=10a10b=10a+bx \cdot y = 10^a \cdot 10^b = 10^{a+b}

so that

log(xy)=a+b\log(xy) = a+b

Examples

Example
log(100)=2log(1000)=3\begin{aligned} \log(100) &= 2 \\ \log(1000) &= 3 \end{aligned}
Example

If

log(2)0.3\log(2) \approx 0.3

then

10y=210^y=2

Note

210=10241000=1032^{10}=1024 \approx 1000 = 10^3

therefore

2103/102 \approx 10^{3/10}

so

log(2)0.3\log (2) \approx 0.3

The Natural Logarithm

A logarithm with ee as a base is referred to as the natural logarithm and is denoted as ln\ln:

y=ln(x)y=\ln(x)

if

x=ey=exp(y)x=e^y=\exp(y)

Note that ln\ln is the inverse of exp\exp.

Fig. 14

Figure: The curve depicts the function y=ln(x)y=\ln(x) and shows that ln\ln is the inverse of exp\exp. Note that ln(1)=0\ln(1)=0 and when y=0y=0 then e0=1e^0=1.

Properties of Logarithm(s)

Logarithms transform multiplicative models into additive models, i.e.

ln(ab)=lna+lnb\ln(a\cdot b) = \ln a + \ln b

Details

This implies that any statistical model, which is multiplicative becomes additive on a log scale, e.g.

y=awbxcy = a \cdot w^b \cdot x^c

lny=(lna)+ln(wb)+ln(xc)\ln y = (\ln a) + \ln (w^b) + \ln (x^c)

Next, note that

ln(x2)=ln(xx)=lnx+lnx=2lnx\begin{aligned} \ln (x^2) &= \ln (x \cdot x) \\ &= \ln x + \ln x \\ &= 2 \cdot \ln x \end{aligned}

and similarly ln(xn)=nlnx\ln (x^n) = n \cdot \ln x for any integer nn.

In general ln(xc)=clnx\ln (x^c) = c \cdot \ln x for any real number c (for x>0x>0).

Thus the multiplicative model (from above)

y=awbxcy=a \cdot w^b \cdot x^c

becomes

y=(lna)+blnw+clnxy= (\ln a) + b \cdot \ln w + c \cdot \ln x

which is a linear model with parameters (lna)(\ln a), bb and cc.

In addition, the log-transform is often variance-stabilizing.

The Exponential Function and the Logarithm

The exponential function and the logarithms are inverses of each other

x=eyy=lnxx = e^y \leftrightarrow y = \ln{x}

Details

Note

Note the properties:

ln(xy)=ln(x)+ln(y)\ln (x \cdot y) = \ln (x) + \ln (y)

and

eaeb=ea+be^a \cdot e^b = e^{a+b}

Examples

Example

Solve the equation

10e1/3x+3=2410e^{1/3x} + 3 = 24

for xx.

First, get the 33 out of the way:

10e1/3x=2110e^{1/3x} = 21

Then the 1010:

e1/3x=2.1e^{1/3x} = 2.1

Next, we can take the natural log of 2.1. Since ln\ln is an inverse function of ee this would result in

13x=ln(2.1)\displaystyle\frac{1}{3}x = \ln(2.1)

This yields

x=ln(2.1)3x = \ln(2.1) \cdot 3

which is

2.23\approx 2.23